package xx.template.design.demo2;

/**
 * @Classname ArraySorter
 * @Description TODO
 * @Date 2023/7/25 14:14
 * @Created by wangxianlin
 */
public abstract class ArraySorter {

    public final void sort(int[] array) {
        if (array == null || array.length == 0) {
            return;
        }
        selectAlgorithm();
        sortArray(array);
    }

    protected abstract void selectAlgorithm();

    protected abstract void sortArray(int[] array);
}
